#include <iostream>

using namespace std;

void swap(int *a, int *b){
    int temp;
    temp = *a;
    *a = *b;
    *b = temp;
}

int main(){
    int left = 1; int right = 2;
    cout << "交换前：" << "left : " << left << "\t" <<"right: " << right << endl;
    swap(left, right);
    cout << "交换后：" << "left : " << left << "\t"<< "right: " << right << endl;
    return 0;
}